import fetch from 'utils/fetch';

//商户查询
export function merchantAll(merchantFormData) {
  return fetch({
	url:  '/api/admin/merchant/find',
  headers: {'Content-type': 'application/json;charset=UTF-8'},
  method: 'post',
  data:merchantFormData
  });
}

//根据商户id查询店铺
export function merchantShop(merchantId) {
return fetch({
	url:  '/api/admin/shop/getMerchantIdShop/'+ merchantId,
headers: {'Content-type': 'application/json;charset=UTF-8'},
method: 'get',
});
}



//固码列表查询
export function searchSolidCode(solidCodeFormData) {
return fetch({
	url:  '/api/merc/solidcode/query',
headers: {'Content-type': 'application/json;charset=UTF-8'},
method: 'post',
data:solidCodeFormData
});
}

//固码分页
export function solidCodePage(solidCodeFormData) {
return fetch({
headers: {'Content-type': 'application/json;charset=UTF-8'},  	
	url:  '/api/merc/solidcode/query',
method: 'post',
data:solidCodeFormData
});
}

//更新固码
export function updateSolidCodeData(solidCodeData) {
return fetch({
headers: {'Content-type': 'application/json;charset=UTF-8'},  	
	url:  '/api/merc/solidcode/updateState',
method: 'post',
data:solidCodeData
});
}

//生成固码
export function solidCode(solidPost) {
return fetch({
headers: {'Content-type': 'application/json;charset=UTF-8'},  	
	url:  '/api/merc/solidcode/create',
method: 'post',
data:solidPost
});
}
//
//预生成固码
export function solidCode2(agentPost) {
return fetch({
headers: {'Content-type': 'application/json;charset=UTF-8'},  	
	url:  '/api/merc/solidcode/create',
method: 'post',
data:agentPost
});
}



//查询代理商编号
export function agentNumFun(agentNum) {
return fetch({
headers: {'Content-type': 'application/json;charset=UTF-8'},  	
	url:  '/api/admin/distributor/selectDistributor?name='+agentNum,
method: 'post',
data:agentNum
});
}
